#include "Peggle.h"

Peggle::Peggle()
{
	helloTex = new Hello();
}

Peggle::~Peggle()
{
}

void Peggle::Update(float dt)
{
	// continuous keyboard check
	if (InputEvent::is_key_down(InputEvent::KEY_RETURN)) {
		std::cout << "Return Key Held" << std::endl;
	}
}

void Peggle::NotifyInput(const InputEvent& event)
{
	// detect key pressed
	if (event.is_keyboard_key_pressed())
	{
		// filter the pressed key code
		if (event.get_keyboard_key() == InputEvent::KEY_RETURN) {
			std::cout << "Return Key Pressed" << std::endl;
			return;
		}

		switch (event.get_keyboard_key())
		{
		case InputEvent::KEY_DOWN:
			break;
		case InputEvent::KEY_LEFT:					  
			break;
		case InputEvent::KEY_RIGHT:
			break;
		case InputEvent::KEY_UP: 				
			break;
		case InputEvent::KEY_DELETE:
			break;
		default:
			break;
		}
	}

	// detect key released
	if (event.is_keyboard_key_released())
	{
		// filter the released key code
		if (event.get_keyboard_key() == InputEvent::KEY_RETURN) {
			std::cout << "Return Key Released" << std::endl;
			return;
		}
	}
}
